import ins from "../utils/ins";
import { DataType } from "../views/goods/Search";

export function getGoodsList() {
    return ins({
        url: 'http://localhost:12580/production',
        method: 'get'   
    })
}



export function setGoodsList(id:number, data: any) {
    console.log(data);
    
    return ins({
        url: 'http://localhost:12580/production/' + id,
        method: 'put',
        data,
    })
}

export function delGoodsList(id: number) {
    return ins({
        url: 'http://localhost:12580/production/' + id,
        method: 'delete'
    })
}

export function addGoods(data: any) {
    return ins({
        url: 'http://localhost:12580/production/',
        method: 'post',
        data
    })
}

export function putGoods(arg: string) {
    return ins({
        url: 'http://localhost:12580/production/',
        
    })
}